package com.fyzk.activity.lottery.recommend_order;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.tyjc.lottery.R;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by fanxs11 on 17/7/4.
 * 晒单——奖励榜Adapter
 */

public class RewardListAdapter extends BaseAdapter {

    private Context context;
    private List<RewardListBean> infos = new ArrayList<>();

    public RewardListAdapter(Context context, List<RewardListBean> infos) {
        this.context = context;
        this.infos = infos;
    }

    @Override
    public int getCount() {
        return 20;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;
        if (convertView == null) {
            holder = new ViewHolder();
            convertView = LayoutInflater.from(context).inflate(R.layout.adapter_rewardlist, null);
            holder.num_tv = (TextView) convertView.findViewById(R.id.rewardlist_item_num);

            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }

        holder.num_tv.setText(""+(position+1));

        return convertView;
    }

    class ViewHolder {
        TextView num_tv;

    }
}
